package com.wcw.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.google.gson.Gson;
import com.wcw.entity.Author;
import com.wcw.mapper.CollectionMapper;

@Service
public class CollectionService {

	@Autowired
	private CollectionMapper collectionMapper;

	public void selectAuthor() {
		List<Author> selectAuthor = collectionMapper.selectAuthor();
		System.out.println(new Gson().toJson(selectAuthor));
	}

	public void selectAuthor2() {
		List<Author> selectAuthor = collectionMapper.selectAuthor2();
		System.out.println(new Gson().toJson(selectAuthor));
	}
	public void selectAuthor3() {
		List<Author> selectAuthor = collectionMapper.selectAuthor2();
		System.out.println(new Gson().toJson(selectAuthor.get(1)));
	}
	public void selectAuthor4() {
		List<Author> selectAuthor = collectionMapper.selectAuthor4();
		System.out.println(new Gson().toJson(selectAuthor));
	}
	public void selectAuthor5() {
		List<Author> selectAuthor = collectionMapper.selectAuthor5();
		System.out.println(new Gson().toJson(selectAuthor));
	}
}
